<?php
session_start();
header("Content-Type: text/html; charset=utf-8");
$warning_login = false;

echo $_REQUEST['from'];

if(isset($_REQUEST['from'])){
    $warning_login = true;
    $url = $_REQUEST['from'];
}

?>
<!DOCTYPE html>
<html class="ui-mobile-rendering">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <title>Twittertido - Procastination everywhere!!!</title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
        <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
        <script src="js/common.js"></script>
        
    </head>
    <body>
        <div data-role="page" >
            <div data-role="header">
                <h1>Logu&eacute;ate</h1>
            </div><!-- /header -->
            <div data-role="content" data-theme="c">
                <div id="error_msg" name="error_msg" style="color: red; text-align: center; display: none">
                    El nombre de usuario y/o password no es correcto
                </div>
                <?php if($warning_login) { ?>
                <div id="error_warning" name="error_msg" style="color: red; text-align: center; display: none">
                    Para comentar debes loguearte, o registrarte si a&uacute;n no lo haz hecho
                </div>
                <?php } ?>
                <div data-role="fieldcontain">
                    <label for="username">Nombre de usuario:</label>
                    <input type="text" name="username" id="username" />
                </div>
                <div data-role="fieldcontain">
                    <label for="password">Password:</label>
                    <input type="password" name="password" id="password" />
                </div>
                <div style="width: 100%; text-align: center"><a href="#">Recordar contrase&ntilde;a</a></div>
                    <button data-theme="b" onclick="submit(<?php print $url; ?>)" id="submiter" name="submiter">Entrar</button>
                    <div id="progress" name="progress" style="display: none"><img src="img/ic_progress.gif" /></div>
                    <div style="width: 100%; text-align: center">o</div>
                    <a href="register.php" data-role="button" data-theme="b" id="register" name="register">Registrarse</a>
            </div>
        </div>
    </body>
</html>